package com.graduation.springbootinit.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.graduation.springbootinit.model.entity.ActivityPart.QuizQuestion;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface QuizQuestionMapper extends BaseMapper<QuizQuestion> {
    
    @Select("SELECT * FROM community_activities_quiz_question WHERE challenge_id = #{challengeId}")
    List<QuizQuestion> selectByChallengeId(Long challengeId);
    
    /**
     * 批量插入题目
     */
    int insertBatch(@Param("list") List<QuizQuestion> questions);
} 